
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    proxy: {
      '/kutp-gui-executor': {      //遇见api前缀的请求，就会触发此代理配置
        target: 'http://localhost:9091/',  //需要代理的后端接口地址
        secure: false,  //如果是https接口，将此参数设为true
        changeOrigin: true,   //是否跨域,设成true表示允许跨域
      },
    },
  }
})
/*** 
module.exports = {
  devServer: {
    proxy: {
      'place/v2/search' : {
        target: 'https://api.map.baidu.com',
        changeOrigin: true,
        secure: true,
        pathRewrite:{
          '^/place/v2/search':''
        }
      }
    }
  }
}
*/
